-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EE-1221: Increase create purse / mint entry point cost #1326
EE-1221: Increase create purse / mint entry point cost #1326
Conversation
42adf10
to
6523512
Compare
@@ -23,7 +23,7 @@ const DEFAULT_ADD_COST: u32 = 5_800; | |||
const DEFAULT_CALL_CONTRACT_COST: u32 = 4_500; | |||
const DEFAULT_CALL_CONTRACT_ARGS_SIZE_WEIGHT: u32 = 420; | |||
|
|||
const DEFAULT_CREATE_PURSE_COST: u32 = 170_000; | |||
const DEFAULT_CREATE_PURSE_COST: u32 = 1_700_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this also be 2_500_000_000; ?
This change first creates a purse and saves them in the account's context which will be later retrieved under payment code. This is due to the fact that create_purse would always trigger GasLimit error.
Conflicts: execution_engine/CHANGELOG.md
bors r+ |
Build succeeded: |
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. The format | |||
|
|||
### Changed | |||
* Support building and testing using stable Rust. | |||
* Changed price of `create_purse` to 2.5CSPR to discourage people from creating purses in the payment code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "in the payment code" is confusing b/c it increases the price across the whole execution, including session code. Is that correct @mpapierski ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, but it was increased specifically to disallow creating those in the payment code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the comment makes it sound as if the cost is increased only in the payment code. I don't think the last part needs to be included in the changelog.
Ref: https://casperlabs.atlassian.net/browse/EE-1221
To discourage creating many empty purses to deplete storage resources, this PR is increasing create_purse/mint cost to 2.5cspr.